## EasyMod 0.3.0 Compatible
############################################################## 
## MOD Title:          Birthday 
## MOD Author:	     Diablo Gamer < info@dgpromod.com > ( Michael Wiekens ) http://mods.dgpromod.com/
## MOD Description:    This mod will add a birthday field into your
##                     user's profile and make users age viewable
##                     to others when viewing posts.
##
## MOD Description2:   if the user have filled a birthday date, a zodiac image will be displayed in the users profile/beside users posts
## Zodiac addon:       this is a ADD-ON and will require Birthday mod to be installed before it will work
##
## MOD Description3:   if the user have filled a birthday date, a chinese zodiac image will be displayed in the users profile
## Chinese zodiac:     this is a ADD-ON and will require Birthday mod to be installed before it will work
##
## MOD Version:        1.6.3
##
## Installation Level: Advanced
## Installation Time:  40 Minutes
## EasyMod installation Time: 1 Minute
##
## Files To Edit: 20
##      index.php
##      viewtopic.php
##      admin/admin_board.php
##      admin/admin_users.php
##      includes/constants.php
##      includes/functions.php
##      includes/page_header.php
##      includes/usercp_avatar.php
##      includes/usercp_register.php
##      includes/usercp_viewprofile.php
##      language/lang_english/lang_admin.php
##      language/lang_english/lang_main.php
##      templates/subSilver/index_body.tpl
##      templates/subSilver/overall_header.tpl
##      templates/subSilver/profile_add_body.tpl
##      templates/subSilver/profile_view_body.tpl
##      templates/subSilver/subSilver.cfg
##	  templates/subSilver/viewtopic_body.tpl
##      templates/subSilver/admin/board_config_body.tpl
##      templates/subSilver/admin/user_edit_body.tpl  
##  
## Included Files: 27
##
##	  root/birthday_popup.php
##	  root/includes/chinese.php
##	  root/templates/subSilver/greeting_popup.tpl
##	  root/templates/subSilver/images/icon_zodiac_capricorn.gif
##	  root/templates/subSilver/images/icon_zodiac_aquarius.gif
##	  root/templates/subSilver/images/icon_zodiac_pisces.gif
##	  root/templates/subSilver/images/icon_zodiac_aries.gif
##	  root/templates/subSilver/images/icon_zodiac_taurus.gif
##	  root/templates/subSilver/images/icon_zodiac_gemini.gif
##	  root/templates/subSilver/images/icon_zodiac_cancer.gif
##	  root/templates/subSilver/images/icon_zodiac_leo.gif
##	  root/templates/subSilver/images/icon_zodiac_virgo.gif
##	  root/templates/subSilver/images/icon_zodiac_libra.gif
##	  root/templates/subSilver/images/icon_zodiac_scorpio.gif
##	  root/templates/subSilver/images/icon_zodiac_sagittarius.gif
##	  root/templates/subSilver/images/icon_chinese_rat.gif
##	  root/templates/subSilver/images/icon_chinese_buffalo.gif
##	  root/templates/subSilver/images/icon_chinese_tiger.gif
##	  root/templates/subSilver/images/icon_chinese_cat.gif
##	  root/templates/subSilver/images/icon_chinese_dragon.gif
##	  root/templates/subSilver/images/icon_chinese_snake.gif
##	  root/templates/subSilver/images/icon_chinese_horse.gif
##	  root/templates/subSilver/images/icon_chinese_goat.gif
##	  root/templates/subSilver/images/icon_chinese_monkey.gif
##	  root/templates/subSilver/images/icon_chinese_cock.gif
##	  root/templates/subSilver/images/icon_chinese_dog.gif
##	  root/templates/subSilver/images/icon_chinese_pig.gif
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
############################################################## 
## Author Notes:
##
## Original MOD Author: Niels < ncr@db9.dk > (Niels Chr. Rd) http://mods.db9.dk
##                      Niels really did most of the work
## 
## 1. Full MOD description
## -----------
## This mod will add a birthday field into your user's profile
## and make users age viewable to others when viewing posts.
## Users who not specify a birthday, the script will default
## to "None Specified." 
## At the day of the users birthday (next visit) the board can
## be configured to display a birthday greeting .
##
## 2. EasyMOD
## -----------
## This MOD is compatible with EasyMOD and can be installed
## by it but is not yet certified EMC (EasyMOD Compliant)!
## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
##
## Warning 1! At the minimum, you need EasyMOD beta 1 (0.2.1a) or
## more recent to install this MOD by EM!
##
## Warning 2! At the present time, EM is not able to install
## automatically other languages than English.
## This gap will be solved in future releases but in the meantime,
## if you need to install any other language than English provides
## with this MOD, please proceed manually (cf. comments in
## the DIY action).
##
## 3. Compatibility
## -----------
## This MOD is phpBB 2.0.22 compliant
##
## 4. Official last version link
## -----------
## Meanwhile the phpBB group validation and as the MOD is not yet
## in the phpBB MOD database, check this official link for updates...
## http://mods.dgpromod.com/viewforum.php?f=2
##
############################################################## 
## MOD History: 
##
##   2007-06-14 -	Version 1.6.3
##	  - Small EasyMod install fix in viewtopic.php ( Birthday + Zodiac`s addon )
##	  - Small EasyMod coppy fix ( Birthday Premod )
##	  - Add EasyMod installation Time to the install
##
##   2007-05-13 - Version 1.6.2
##	  - Full mod take over from Niels
##
##   2007-04-12 - Version 1.6.1 ( thnx to Diablo Gamer )
##      - Add the addon Chinese zodiac and Chinese zodiac's in viewtopic in the Birthday + Zodiac install
##	  - changed the mod name Birthday + Zodiac to Birthday + Zodiac`s
##
##   2007-03-29 - Version 1.6.0 ( thnx to Diablo Gamer )
##	  -  mod take over
##      - Modify a FIND to be phpBB 2.0.22 compliant
##      - Modify a FIND to be EasyMod 0.3.0 compliant
##	  - Improved install.txt file
##	  - Add Birthday premod files in the Contrib folder 
##	  - Add Birthday + Zodiac premod files in the Contrib folder 
##	  - Add Birthday + Zodiac install.txt file in the Contrib folder 
## 
##   2006-04-16 - Version 1.5.9
##      - Modify a FIND to be phpBB 2.0.20 compliant
##
##   2006-01-12 - Version 1.5.8
##      - phpBB template & EasyMOD compliance enhancement
##      - Modify 2 FIND instructions to be phpBB 2.0.18+ compliant
##      - Include the sql queries in the MOD and remove the
##        birthday_db_update.php file
##      - Add DIY instructions to install other languages than English
##      - Use the INCREMENT instruction to increment the
##        whosonline.gif rowspan
##
##   2004-09-12 - Version 1.5.7
##      - timezone fix, to page_header.php - a typo, made popup happen without timezone applyed
##
##   2004-04-25 - Version 1.5.6 
##      - add or update the Dutch, French, Hungarian, Icelandic, 
##        Romanian, Slovak, polish & Spanish translation in the MOD archive 
##      - add the 2 zodiac optional features and their available 
##        translations in the MOD archive 
##
##   2004-04-22 - Version 1.5.5
##	- fixed a isue in index.php, witch couse a error if username have special chars
##
##   2003-12-10 - Version 1.5.4
##	- changed the sql into index.php, with a more standart sql
##
##   2003-12-07 - Version 1.5.3
##      - phpBB template & EasyMOD compliance enhancement
##      - Chinese Traditional Taiwan, Dutch, Estonian, French,
##        German & Thai translations now provide with the MOD
## 
##   2003-10-13 - Version 1.5.2
##      - corrected index.php, allowing  lookforward set to 0
## 
##   2003-08-27 - Version 1.5.1  
##      - Corrected the how-to for Subsilver -> subSilver,
##        making it work on *NIX OS
##      - corrected the how-to for usercp_viewprofile.php, to
##        make it work beter with the ADD-ON's
## 
##   2003-08-27 - Version 1.5.0  
##      - Now ready for 2.0.6. and EM
##      - merged part 1 and part 2, now only one larger "how-to",
##        part 3 and 4 will be renamed to "ADD-ON" 1 and 2
## 
##   2003-08-03 - Version 1.4.21
##      - fixed a language isue with the new code in functions.php
## 
##   2003-08-02 - Version 1.4.20
##      - corrected the how-to, regarding file functions.php
## 
##   ????-??-?? - Version 1.4.19
##      - corrected 1.4.18. update (index.php)
## 
##   ????-??-?? - Version 1.4.18
##      - corrected 1.4.17. update (functions.php/index.php)
## 
##   ????-??-?? - Version 1.4.17
##      - change some code, witch should respond faster
## 
##   ????-??-?? - Version 1.4.16
##      - confirmed for 2.0.5. by "kooky"
## 
##   ????-??-?? - Version 1.4.15
##      - corrected the find tag once again, SECURITY RISK
## 
##   ????-??-?? - Version 1.4.14
##      - changed a find tag, witch was giving some users truble
##        using, if other mods
## 
##   ????-??-?? - Version 1.4.13
##      - cosmetic changes
## 
##   ????-??-?? - Version 1.4.12
##      - corrected a misbehaiver, if user was registering and
##        a error occoured
## 
##   ????-??-?? - Version 1.4.11
##      - corrected a typo in the usercp_register, regarding
##        popup messages
## 
##   ????-??-?? - Version 1.4.10
##      - removed a free_result, since mySQL 4.x users did
##        have problem with this
## 
##   ????-??-?? - Version 1.4.9
##      - fixed a problem, if avartar is viewed in user edit,
##        and no birthday was selected
## 
##   ????-??-?? - Version 1.4.8
##      - changed a find tag in usercp_register.php
## 
##   ????-??-?? - Version 1.4.7
##      - improved page_header.php
## 
##   ????-??-?? - Version 1.4.6
##      - made it posible to specify user must submit birthday
## 
##   ????-??-?? - Version 1.4.5
##      - made 2 tags identicall
## 
##   ????-??-?? - Version 1.4.4
##      - still some typos in the how-to regarding $n / $i in
##        viewtopic.php
## 
##   ????-??-?? - Version 1.4.3
##      - corrected zodiac in viewtopic, so if no birthday,
##        no zodiac is showen
## 
##   ????-??-?? - Version 1.4.2
##      - corrected the viewtopic.php, zodiac should only be
##        inserted, if part 3 are installed
## 
##   ????-??-?? - Version 1.4.1
##      - cosmetic change in viewtopic_body.tpl
## 
##   ????-??-?? - Version 1.4.0
##      - confirmed for ver 2.0.4, change in usercp_register.php,
##        lang_main.php
## 
##   ????-??-?? - Version 1.3.16
##      - '//' is changed to '//W' in functions.php
## 
##   ????-??-?? - Version 1.3.15
##      - users birthday was "reset" if other errors occour
##        in usercp_register.php
## 
##   ????-??-?? - Version 1.3.14
##      - a $$ is changed to a $ in index.php
## 
##   ????-??-?? - Version 1.3.13
##      - fix, date of 1. was showen as last day in previous month
## 
##   ????-??-?? - Version 1.3.12
##      - if no users in list a "array" was showen,
##        this is now corrected
## 
##   ????-??-?? - Version 1.3.11
##      - usernames on index sepperated by commas
## 
##   ????-??-?? - Version 1.3.10
##      - missed some language updates for ver 1.3.9
## 
##   ????-??-?? - Version 1.3.9
##      - fix, age calculation around year shift 
## 
##   ????-??-?? - Version 1.3.8
##      - code in functions.php improved
## 
##   ????-??-?? - Version 1.3.7
##      - code in ver 1.3.6. improved
## 
##   ????-??-?? - Version 1.3.6
##      - improved drop down, thanks to "weaselweb"
## 
##   ????-??-?? - Version 1.3.5
##      - there was a typo in the how-to regarding page_header.php
## 
##   ????-??-?? - Version 1.3.4
##      - calculation of dates now correct on 31-12 if leap
##        year and date > 1970
## 
##   ????-??-?? - Version 1.3.3
##      - corrected some typo's related to user_register.php
##        introduced in ver 1.3.0
## 
##   ????-??-?? - Version 1.3.2
##      - included the file birthday_popup.php, now changes
##        to privmsg.php are not nessesary
## 
##   ????-??-?? - Version 1.3.1
##      - fix a bug in index.php
## 
##   ????-??-?? - Version 1.3.0
##      - Now support drop down box as input for birthday in
##        users profile
## 
##   ????-??-?? - Version 1.2.2
##      - $year changed to $birth_year, to avoid complications
##        together with other mods
## 
##   ????-??-?? - Version 1.2.1
##      - have missed to include some changes in the how-to,
##        regarding viewtopic.php
## 
##   ????-??-?? - Version 1.2.0
##      - now confirmed for phpBB2 version 2.0.2
## 
##   ????-??-?? - Version 1.1.14
##      - fixed a mistake in index.php, that causes no users
##        to have birthday
## 
##   ????-??-?? - Version 1.1.13
##      - fixed a wrong FIND after the speed improvements
## 
##   ????-??-?? - Version 1.1.12
##      - speed improvements, I have moved some of the code
##        from page_header.php to index.php, it turn out that
##        none was using the info on other pages, so no need
##        for them there
## 
##   ????-??-?? - Version 1.1.11
##      - the english language file, have now changed a few
##        places thanks to "mr Cru"
## 
##   ????-??-?? - Version 1.1.10
##      - minor change the lang_main.php, $lang['Birthday_explain']
##        to properly support different birthday formats
## 
##   ????-??-?? - Version 1.1.9
##      - fix a missing </span> tag in profile_add_body.tpl
## 
##   ????-??-?? - Version 1.1.8
##      - history started, improved page_header.php
## 
##   ????-??-?? - Version 1.1.0
##      - initial relese phpBB2 ver 2.0.0.
## 
##   ????-??-?? - Version 1.0.0
##      - initial release
## 
##   ????-??-?? - Version 0.9.0
##      - initial BETA release phpBB2 RC-2
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
#
#-----[ SQL ]-------------------------------------------------
#
ALTER TABLE phpbb_users ADD user_birthday INT DEFAULT '999999' not null;
ALTER TABLE phpbb_users ADD user_next_birthday_greeting INT DEFAULT '0' not null;
INSERT INTO phpbb_config (config_name, config_value) VALUES ('birthday_required', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('birthday_greeting', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_user_age', '100');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('min_user_age', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('birthday_check_day', '7');

# 
#-----[ COPY ]------------------------------------------------ 
#
copy root/birthday_popup.php to birthday_popup.php
copy root/includes/chinese.php to includes/chinese.php
copy root/templates/subSilver/greeting_popup.tpl to templates/subSilver/greeting_popup.tpl
copy root/templates/subSilver/images/icon_zodiac_capricorn.gif to templates/subSilver/images/icon_zodiac_capricorn.gif
copy root/templates/subSilver/images/icon_zodiac_aquarius.gif to templates/subSilver/images/icon_zodiac_aquarius.gif
copy root/templates/subSilver/images/icon_zodiac_pisces.gif to templates/subSilver/images/icon_zodiac_pisces.gif
copy root/templates/subSilver/images/icon_zodiac_aries.gif to templates/subSilver/images/icon_zodiac_aries.gif
copy root/templates/subSilver/images/icon_zodiac_taurus.gif to templates/subSilver/images/icon_zodiac_taurus.gif
copy root/templates/subSilver/images/icon_zodiac_gemini.gif to templates/subSilver/images/icon_zodiac_gemini.gif
copy root/templates/subSilver/images/icon_zodiac_cancer.gif to templates/subSilver/images/icon_zodiac_cancer.gif
copy root/templates/subSilver/images/icon_zodiac_leo.gif to templates/subSilver/images/icon_zodiac_leo.gif
copy root/templates/subSilver/images/icon_zodiac_virgo.gif to templates/subSilver/images/icon_zodiac_virgo.gif
copy root/templates/subSilver/images/icon_zodiac_libra.gif to templates/subSilver/images/icon_zodiac_libra.gif
copy root/templates/subSilver/images/icon_zodiac_scorpio.gif to templates/subSilver/images/icon_zodiac_scorpio.gif
copy root/templates/subSilver/images/icon_zodiac_sagittarius.gif to templates/subSilver/images/icon_zodiac_sagittarius.gif
copy root/templates/subSilver/images/icon_chinese_rat.gif to templates/subSilver/images/icon_chinese_rat.gif
copy root/templates/subSilver/images/icon_chinese_buffalo.gif to templates/subSilver/images/icon_chinese_buffalo.gif
copy root/templates/subSilver/images/icon_chinese_tiger.gif to templates/subSilver/images/icon_chinese_tiger.gif
copy root/templates/subSilver/images/icon_chinese_cat.gif to templates/subSilver/images/icon_chinese_cat.gif
copy root/templates/subSilver/images/icon_chinese_dragon.gif to templates/subSilver/images/icon_chinese_dragon.gif
copy root/templates/subSilver/images/icon_chinese_snake.gif to templates/subSilver/images/icon_chinese_snake.gif
copy root/templates/subSilver/images/icon_chinese_horse.gif to templates/subSilver/images/icon_chinese_horse.gif
copy root/templates/subSilver/images/icon_chinese_goat.gif to templates/subSilver/images/icon_chinese_goat.gif
copy root/templates/subSilver/images/icon_chinese_monkey.gif to templates/subSilver/images/icon_chinese_monkey.gif
copy root/templates/subSilver/images/icon_chinese_cock.gif to templates/subSilver/images/icon_chinese_cock.gif
copy root/templates/subSilver/images/icon_chinese_dog.gif to templates/subSilver/images/icon_chinese_dog.gif
copy root/templates/subSilver/images/icon_chinese_pig.gif to templates/subSilver/images/icon_chinese_pig.gif

#
#-----[ OPEN ]------------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------------
#
//
// Start output of page

#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Birthday Mod, Show users with birthday 
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql)) 
{ 
	if (!empty($result)) 
	{ 
		$time_now = time();
		$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
		$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
		$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
	      while ($birthdayrow = $db->sql_fetchrow($result))
		{ 
		      $user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] )); 
      		if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
			if ( $user_birthday2 > $date_today  && $user_birthday2 <= $date_forward ) 
			{ 
				// user are having birthday within the next days
				$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']); 
				switch ($birthdayrow['user_level'])
				{
					case ADMIN :
		      			$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>'; 
      					$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
						break;
					case MOD :
		      			$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>'; 
      					$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
						break;
					default: $style_color = '';
				}
				$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,'; 
			} else if ( $user_birthday2 == $date_today ) 
      		{ 
				//user have birthday today 
				$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] ); 
				switch ($birthdayrow['user_level'])
				{
					case ADMIN :
		      			$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>'; 
      					$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
						break;
					case MOD :
			      		$birthdayrow['username'] = '<b>' . $birthdayrow['username'] . '</b>'; 
      					$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
						break;
					default: $style_color = '';
				}

				$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '"' . $style_color .'>' . $birthdayrow['username'] . ' ('.$user_age.')</a>,'; 
		      }
			 
		}
		if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
		if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
	} 
	$db->sql_freeresult($result);
}

#
#-----[ FIND ]------------------------------------------------
#
'L_FORUM' =>

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
		'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day'] > 1) ? sprintf( (($birthday_week_list) ? $lang['Birthday_week'] : $lang['Nobirthday_week']), $board_config['birthday_check_day']).$birthday_week_list : '',
		'L_WHOSBIRTHDAY_TODAY' => ($board_config['birthday_check_day']) ? ($birthday_today_list) ? $lang['Birthday_today'].$birthday_today_list : $lang['Nobirthday_today'] : '',
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT u.username, 

#
#-----[ IN-LINE FIND ]----------------------------------------
#
, u.user_allowsmile

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, u.user_birthday, u.user_next_birthday_greeting

#
#-----[ FIND ]------------------------------------------------
#
//
// Okay, let's do the loop, yeah come on baby let's do the loop

#
#-----[ BEFORE, ADD ]------------------------------------------
#

include($phpbb_root_path . 'includes/chinese.'.$phpEx);

#
#-----[ FIND ]------------------------------------------------
for($i = 0; $i < $total_posts; $i++)

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
$this_year = create_date('Y', time(), $board_config['board_timezone']);
$this_date = create_date('md', time(), $board_config['board_timezone']);
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------
#
	$poster_id = $postrow[$i]['user_id'];
	$poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	if ( $postrow[$i]['user_birthday'] != 999999 ) 
	{
		$poster_birthdate=realdate('md', $postrow[$i]['user_birthday']);
		$n=0;
		while ($n<26)
		{
			if ($poster_birthdate>=$zodiacdates[$n] && $poster_birthdate<=$zodiacdates[$n+1])
			{
				$zodiac = $lang[$zodiacs[($n/2)]];
				$u_zodiac = $images[$zodiacs[($n/2)]];
				$zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="top" border="0" />';
				$n=26;
			} else
			{
				$n=$n+2;
			}
		}
		$poster_age = $this_year - realdate ('Y',$postrow[$i]['user_birthday']);
		if ($this_date < $poster_birthdate) $poster_age--;
		$poster_age = $lang['Age'] . ': ' . $poster_age;
	$chinese = get_chinese_year (realdate('Ymd', $postrow[$i]['user_birthday']));
	$u_chinese = $images[$chinese];
	$chinese_img = ($chinese=='Unknown') ? '' : '<img src="' . $u_chinese . '" alt="' . $lang[$chinese] . '" title="' . $lang[$chinese] . '" align="absmiddle" border="0" />';
	} else
	{
		$zodiac = '';
		$u_zodiac = '';
		$zodiac_img = '';
		$poster_age = '';
		$chinese = '';
		$u_chinese = '';
		$chinese_img = '';
	}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
	if ( $poster_id == ANONYMOUS && $postrow[$i]['post_username'] != '' )
	{
		$poster = $postrow[$i]['post_username'];
		$poster_rank = $lang['Guest'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		$poster_age = '';
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'POSTER_NAME' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		'ZODIAC_IMG' => $zodiac_img,
		'ZODIAC' => $zodiac,
		'U_ZODIAC' => $u_zodiac,
		'L_ZODIAC' => ($zodiac) ? $lang['Zodiac'] . ': ' : '',
		'POSTER_AGE' => $poster_age,
		'CHINESE' => $lang[$chinese],
		'CHINESE_IMG' => $chinese_img,
		'U_CHINESE' => $u_chinese,
		'L_CHINESE' => ($chinese) ? $lang['Chinese_zodiac'] . ': ' : '',
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php

#
#-----[ FIND ]------------------------------------------------
#
$prune_no = ( !$new['prune_enable'] ) ? "checked=\"checked\"" : "";

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
$birthday_greeting_yes = ( $new['birthday_greeting'] ) ? "checked=\"checked\"" : "";
$birthday_greeting_no = ( !$new['birthday_greeting'] ) ? "checked=\"checked\"" : "";
$birthday_required_yes = ( $new['birthday_required'] ) ? "checked=\"checked\"" : "";
$birthday_required_no = ( !$new['birthday_required'] ) ? "checked=\"checked\"" : "";
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
"L_ENABLE_PRUNE" =>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Birthday MOD
	"L_ENABLE_BIRTHDAY_GREETING" => $lang['Enable_birthday_greeting'],
	"L_BIRTHDAY_GREETING_EXPLAIN" => $lang['Birthday_greeting_expain'],
	"L_BIRTHDAY_REQUIRED" => $lang['Birthday_required'],
	"L_MAX_USER_AGE" => $lang['Max_user_age'],
	"L_MIN_USER_AGE" => $lang['Min_user_age'],
	"L_MIN_USER_AGE_EXPLAIN" => $lang['Min_user_age_explain'],
	"L_BIRTHDAY_LOOKFORWARD" => $lang['Birthday_lookforward'],
	"L_BIRTHDAY_LOOKFORWARD_EXPLAIN" => $lang['Birthday_lookforward_explain'],
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
"PRUNE_NO" =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	"BIRTHDAY_GREETING_YES" => $birthday_greeting_yes,
	"BIRTHDAY_GREETING_NO" => $birthday_greeting_no,
	"BIRTHDAY_REQUIRED_YES" => $birthday_required_yes,
	"BIRTHDAY_REQUIRED_NO" => $birthday_required_no, 
	"MAX_USER_AGE" => $new['max_user_age'],
	"MIN_USER_AGE" => $new['min_user_age'],
	"BIRTHDAY_LOOKFORWARD" => $new['birthday_check_day'],
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_users.php

#
#-----[ FIND ]------------------------------------------------
#
		$interests = ( !empty($HTTP_POST_VARS['interests']) ) ? trim(strip_tags( $HTTP_POST_VARS['interests'] ) ) : '';

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		if (isset($HTTP_POST_VARS['birthday']) )
		{
			$birthday = intval ($HTTP_POST_VARS['birthday']);
			$b_day = realdate('j',$birthday);
			$b_md = realdate('n',$birthday);
			$b_year = realdate('Y',$birthday);
		} else
		{
			$b_day = ( isset($HTTP_POST_VARS['b_day']) ) ? intval ($HTTP_POST_VARS['b_day']) : 0;
			$b_md = ( isset($HTTP_POST_VARS['b_md']) ) ? intval ($HTTP_POST_VARS['b_md']) : 0;
			$b_year = ( isset($HTTP_POST_VARS['b_year']) ) ? intval ($HTTP_POST_VARS['b_year']) : 0;
			$birthday = mkrealdate($b_day,$b_md,$b_year);
		}
		$next_birthday_greeting = ( !empty($HTTP_POST_VARS['next_birthday_greeting']) ) ? intval( $HTTP_POST_VARS['next_birthday_greeting'] ) : 0;
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
//
// Update entry in DB
          
#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
// find the birthday values, reflected by the $lang['Submit_date_format']
		if ($b_day || $b_md || $b_year) //if a birthday is submited, then validate it
		{
			$user_age=(date('md')>=$b_md.(($b_day <= 9) ? '0':'').$b_day) ? date('Y') - $b_year : date('Y') - $b_year - 1 ;
			// Check date, maximum / minimum user age
			if (!checkdate($b_md,$b_day,$b_year))
			{
				$error = TRUE;
				if( isset($error_msg) )$error_msg .= "<br />";
				$error_msg .= $lang['Wrong_birthday_format'];
			} else
			if ($user_age>$board_config['max_user_age'])
			{
				$error = TRUE;
				if( isset($error_msg) )$error_msg .= "<br />";
				$error_msg .= sprintf($lang['Birthday_to_high'],$board_config['max_user_age']);
			} else
			if ($user_age<$board_config['min_user_age'])
			{
				$error = TRUE;
				if( isset($error_msg) )$error_msg .= "<br />";
				$error_msg .= sprintf($lang['Birthday_to_low'],$board_config['min_user_age']);
			} else
			{
				$birthday = ($error) ? $birthday : mkrealdate($b_day,$b_md,$b_year);
			}
		} else $birthday = ($error) ? '' : 999999;
// End add - Birthday MOD
	
#
#-----[ FIND ]------------------------------------------------
#
			$sql = "UPDATE " . USERS_TABLE . "
				SET

#
#-----[ IN-LINE FIND ]----------------------------------------
#
str_replace("\'", "''", $interests) . "'

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_birthday='$birthday', user_next_birthday_greeting=$next_birthday_greeting

#
#-----[ FIND ]------------------------------------------------
#
		$interests = htmlspecialchars($this_userdata['user_interests']);

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		$next_birthday_greeting = $this_userdata['user_next_birthday_greeting'];
		if ($this_userdata['user_birthday']!=999999)
		{
			$birthday = realdate($lang['Submit_date_format'],$this_userdata['user_birthday']);
			$b_day = realdate('j',$this_userdata['user_birthday']);
			$b_md = realdate('n',$this_userdata['user_birthday']);
			$b_year = realdate('Y',$this_userdata['user_birthday']);
		} else
		{
			$b_day = '';
			$b_md = '';
			$b_year = '';
			$birthday = '';
		}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
			$s_hidden_fields .= '<input type="hidden" name="interests" value="' . str_replace("\"", "&quot;", $interests) . '" />';

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
			$s_hidden_fields .= '<input type="hidden" name="birthday" value="'.$birthday.'" />';
			$s_hidden_fields .= '<input type="hidden" name="next_birthday_greeting" value="'.$next_birthday_greeting.'" />';
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
			"body" => "admin/user_edit_body.tpl")
		);

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		$s_b_day = '<span class="genmed">' . $lang['Day'] . '&nbsp;</span><select name="b_day" size="1" class="gensmall"> 
		<option value="0">&nbsp;-&nbsp;</option> 
			<option value="1">&nbsp;1&nbsp;</option>
			<option value="2">&nbsp;2&nbsp;</option>
			<option value="3">&nbsp;3&nbsp;</option>
			<option value="4">&nbsp;4&nbsp;</option>
			<option value="5">&nbsp;5&nbsp;</option>
			<option value="6">&nbsp;6&nbsp;</option>
			<option value="7">&nbsp;7&nbsp;</option>
			<option value="8">&nbsp;8&nbsp;</option>
			<option value="9">&nbsp;9&nbsp;</option>
			<option value="10">&nbsp;10&nbsp;</option>
			<option value="11">&nbsp;11&nbsp;</option>
			<option value="12">&nbsp;12&nbsp;</option>
			<option value="13">&nbsp;13&nbsp;</option>
			<option value="14">&nbsp;14&nbsp;</option>
			<option value="15">&nbsp;15&nbsp;</option>
			<option value="16">&nbsp;16&nbsp;</option>
			<option value="17">&nbsp;17&nbsp;</option>
			<option value="18">&nbsp;18&nbsp;</option>
			<option value="19">&nbsp;19&nbsp;</option>
			<option value="20">&nbsp;20&nbsp;</option>
			<option value="21">&nbsp;21&nbsp;</option>
			<option value="22">&nbsp;22&nbsp;</option>
			<option value="23">&nbsp;23&nbsp;</option>
			<option value="24">&nbsp;24&nbsp;</option>
			<option value="25">&nbsp;25&nbsp;</option>
			<option value="26">&nbsp;26&nbsp;</option>
			<option value="27">&nbsp;27&nbsp;</option>
			<option value="28">&nbsp;28&nbsp;</option>
			<option value="29">&nbsp;29&nbsp;</option>
			<option value="30">&nbsp;30&nbsp;</option>
			<option value="31">&nbsp;31&nbsp;</option>
			</select>&nbsp;&nbsp;';
		$s_b_md = '<span class="genmed">' . $lang['Month'] . '&nbsp;</span><select name="b_md" size="1" class="gensmall"> 
     		<option value="0">&nbsp;-&nbsp;</option> 
			<option value="1">&nbsp;'.$lang['datetime']['January'].'&nbsp;</option>
			<option value="2">&nbsp;'.$lang['datetime']['February'].'&nbsp;</option>
			<option value="3">&nbsp;'.$lang['datetime']['March'].'&nbsp;</option>
			<option value="4">&nbsp;'.$lang['datetime']['April'].'&nbsp;</option>
			<option value="5">&nbsp;'.$lang['datetime']['May'].'&nbsp;</option>
			<option value="6">&nbsp;'.$lang['datetime']['June'].'&nbsp;</option>
			<option value="7">&nbsp;'.$lang['datetime']['July'].'&nbsp;</option>
			<option value="8">&nbsp;'.$lang['datetime']['August'].'&nbsp;</option>
			<option value="9">&nbsp;'.$lang['datetime']['September'].'&nbsp;</option>
			<option value="10">&nbsp;'.$lang['datetime']['October'].'&nbsp;</option>
			<option value="11">&nbsp;'.$lang['datetime']['November'].'&nbsp;</option>
			<option value="12">&nbsp;'.$lang['datetime']['December'].'&nbsp;</option>
			</select>&nbsp;&nbsp;';
		$s_b_day= str_replace("value=\"".$b_day."\">", "value=\"".$b_day."\" SELECTED>" ,$s_b_day);
		$s_b_md = str_replace("value=\"".$b_md."\">", "value=\"".$b_md."\" SELECTED>" ,$s_b_md);
		$s_b_year = '<span class="genmed">' . $lang['Year'] . '&nbsp;</span><input type="text" class="post" style="width: 50px" name="b_year" size="4" maxlength="4" value="' . $b_year . '" />&nbsp;&nbsp;'; 
		$i = 0;
		$s_birthday = '';
		for ($i=0;$i<=strlen($lang['Submit_date_format']);$i++)
		{
			switch ($lang['Submit_date_format'][$i])
			{
				case d:  $s_birthday .=$s_b_day;break;
				case m:  $s_birthday .=$s_b_md;break;
				case Y:  $s_birthday .=$s_b_year;break;
			}
		}
// End add - Birthday MOD
         
#
#-----[ FIND ]------------------------------------------------
#
'INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
			'NEXT_BIRTHDAY_GREETING' => $next_birthday_greeting,
			'S_BIRTHDAY' => $s_birthday,
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'L_INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
			'L_BIRTHDAY' => $lang['Birthday'],
			'L_NEXT_BIRTHDAY_GREETING' => $lang['Next_birthday_greeting'],
			'L_NEXT_BIRTHDAY_GREETING_EXPLAIN' => $lang['Next_birthday_greeting_expain'],
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

//added for birthday zodiac
$zodiacdates = array ('0101', '0120',
			'0121', '0219',
			'0220', '0320',
			'0321', '0420',
			'0421', '0520',
			'0521', '0621',
			'0622', '0722',
			'0723', '0823',
			'0824', '0922',
			'0923', '1022',
			'1023', '1122',
			'1123', '1221',
			'1222', '1231');
$zodiacs = array ('Capricorn','Aquarius', 'Pisces', 'Aries', 'Taurus', 'Gemini', 'Cancer', 'Leo', 'Virgo', 'Libra', 'Scorpio', 'Sagittarius','Capricorn');


#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Add function mkrealdate for Birthday MOD
// the originate php "mktime()", does not work proberly on all OS, especially when going back in time
// before year 1970 (year 0), this function "mkrealtime()", has a mutch larger valid date range,
// from 1901 - 2099. it returns a "like" UNIX timestamp divided by 86400, so
// calculation from the originate php date and mktime is easy.
// mkrealdate, returns the number of day (with sign) from 1.1.1970.

function mkrealdate($day,$month,$birth_year)
{
	// range check months
	if ($month<1 || $month>12) return "error";
	// range check days
	switch ($month)
	{
		case 1: if ($day>31) return "error";break;
		case 2: if ($day>29) return "error";
			$epoch=$epoch+31;break;
		case 3: if ($day>31) return "error";
			$epoch=$epoch+59;break;
		case 4: if ($day>30) return "error" ;
			$epoch=$epoch+90;break;
		case 5: if ($day>31) return "error";
			$epoch=$epoch+120;break;
		case 6: if ($day>30) return "error";
			$epoch=$epoch+151;break;
		case 7: if ($day>31) return "error";
			$epoch=$epoch+181;break;
		case 8: if ($day>31) return "error";
			$epoch=$epoch+212;break;
		case 9: if ($day>30) return "error";
			$epoch=$epoch+243;break;
		case 10: if ($day>31) return "error";
			$epoch=$epoch+273;break;
		case 11: if ($day>30) return "error";
			$epoch=$epoch+304;break;
		case 12: if ($day>31) return "error";
			$epoch=$epoch+334;break;
	}
	$epoch=$epoch+$day;
	$epoch_Y=sqrt(($birth_year-1970)*($birth_year-1970));
	$leapyear=round((($epoch_Y+2) / 4)-.5);
	if (($epoch_Y+2)%4==0)
	{// curent year is leapyear
		$leapyear--;
		if ($birth_year >1970 && $month>=3) $epoch=$epoch+1;
		if ($birth_year <1970 && $month<3) $epoch=$epoch-1;
	} else if ($month==2 && $day>28) return "error";//only 28 days in feb.
	//year
	if ($birth_year>1970)
		$epoch=$epoch+$epoch_Y*365-1+$leapyear;
	else
		$epoch=$epoch-$epoch_Y*365-1-$leapyear;
	return $epoch;
}

// Add function realdate for Birthday MOD
// the originate php "date()", does not work proberly on all OS, especially when going back in time
// before year 1970 (year 0), this function "realdate()", has a mutch larger valid date range,
// from 1901 - 2099. it returns a "like" UNIX date format (only date, related letters may be used, due to the fact that
// the given date value should already be divided by 86400 - leaving no time information left)
// a input like a UNIX timestamp divided by 86400 is expected, so
// calculation from the originate php date and mktime is easy.
// e.g. realdate ("m d Y", 3) returns the string "1 3 1970"

// UNIX users should replace this function with the below code, since this should be faster
//
//function realdate($date_syntax="Ymd",$date=0) 
//{ return create_date($date_syntax,$date*86400+1,0); }

function realdate($date_syntax="Ymd",$date=0)
{
	global $lang;
	$i=2;
	if ($date>=0)
	{
	 	return create_date($date_syntax,$date*86400+1,0);
	} else
	{
		$year= -(date%1461);
		$days = $date + $year*1461;
		while ($days<0)
		{
			$year--;
			$days+=365;
			if ($i++==3)
			{
				$i=0;
				$days++;
			}
		}
	}
	$leap_year = ($i==0) ? TRUE : FALSE;
	$months_array = ($i==0) ?
		array (0,31,60,91,121,152,182,213,244,274,305,335,366) :
		array (0,31,59,90,120,151,181,212,243,273,304,334,365);
	for ($month=1;$month<12;$month++)
	{
		if ($days<$months_array[$month]) break;
	}

	$day=$days-$months_array[$month-1]+1;
	//you may gain speed performance by remove som of the below entry's if they are not needed/used
	return strtr ($date_syntax, array(
		'a' => '',
		'A' => '',
		'\\d' => 'd',
		'd' => ($day>9) ? $day : '0'.$day,
		'\\D' => 'D',
		'D' => $lang['day_short'][($date-3)%7],
		'\\F' => 'F',
		'F' => $lang['month_long'][$month-1],
		'g' => '',
		'G' => '',
		'H' => '',
		'h' => '',
		'i' => '',
		'I' => '',
		'\\j' => 'j',
		'j' => $day,
		'\\l' => 'l',
		'l' => $lang['day_long'][($date-3)%7],
		'\\L' => 'L',
		'L' => $leap_year,
		'\\m' => 'm',
		'm' => ($month>9) ? $month : '0'.$month,
		'\\M' => 'M',
		'M' => $lang['month_short'][$month-1],
		'\\n' => 'n',
		'n' => $month,
		'O' => '',
		's' => '',
		'S' => '',
		'\\t' => 't',
		't' => $months_array[$month]-$months_array[$month-1],
		'w' => '',
		'\\y' => 'y',
		'y' => ($year>29) ? $year-30 : $year+70,
		'\\Y' => 'Y',
		'Y' => $year+1970,
		'\\z' => 'z',
		'z' => $days,
		'\\W' => '',
		'W' => '') );
}
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]------------------------------------------------
#
if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) )
{

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
// see if user has or have had birthday, also see if greeting are enabled
	if ( $userdata['user_birthday']!=999999 && $board_config['birthday_greeting'] && create_date('Ymd', time(), $board_config['board_timezone'])  >= $userdata['user_next_birthday_greeting'].realdate ('md',$userdata['user_birthday'] ) )
	{
		$sql = "UPDATE " . USERS_TABLE . "
			SET user_next_birthday_greeting = " . (create_date('Y', time(), $board_config['board_timezone'])+1) . "
			WHERE user_id = " . $userdata['user_id'];
		if( !$status = $db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, "Could not update next_birthday_greeting for user.", "", __LINE__, __FILE__, $sql);
		}
		$template->assign_var("GREETING_POPUP",
			"<script language=\"Javascript\" type=\"text/javascript\"><!--
			window.open('".append_sid('birthday_popup.'.$phpEx)."', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
			//-->
			</script>");
	} //Sorry user shall not have a greeting this year
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_avatar.php

#
#-----[ FIND ]------------------------------------------------
#
function display_avatar_gallery(

#
#-----[ IN-LINE FIND ]----------------------------------------
#
)

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, &$birthday

#
#-----[ FIND ]------------------------------------------------
#
	$params = array(

#
#-----[ IN-LINE FIND ]----------------------------------------
#
);

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, 'birthday'

#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------------
#
$signature_bbcode_uid = '';

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	if (isset($HTTP_POST_VARS['birthday']) )
	{
		$birthday = intval ($HTTP_POST_VARS['birthday']);
		if ($birthday!=999999)
		{
			$b_day = realdate('j',$birthday); 
			$b_md = realdate('n',$birthday); 
			$b_year = realdate('Y',$birthday);
		}
	} else
	{
		$b_day = ( isset($HTTP_POST_VARS['b_day']) ) ? intval ($HTTP_POST_VARS['b_day']) : 0;
		$b_md = ( isset($HTTP_POST_VARS['b_md']) ) ? intval ($HTTP_POST_VARS['b_md']) : 0;
		$b_year = ( isset($HTTP_POST_VARS['b_year']) ) ? intval ($HTTP_POST_VARS['b_year']) : 0;
		if ($b_day && $b_md && $b_year)
		{
			$birthday = mkrealdate($b_day,$b_md,$b_year);
		} else
		{
			$birthday = 999999;
		}
	}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
		$avatar_sql = user_avatar_gallery($mode
	}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// Start add - Birthday MOD
// find the birthday values, reflected by the $lang['Submit_date_format']
	if ($b_day || $b_md || $b_year) //if a birthday is submited, then validate it
	{
		$user_age=(date('md')>=$b_md.(($b_day <= 9) ? '0':'').$b_day) ? date('Y') - $b_year : date('Y') - $b_year - 1 ;
		// Check date, maximum / minimum user age
		if (!checkdate($b_md,$b_day,$b_year))
		{
			$error = TRUE;
			if( isset($error_msg) )$error_msg .= "<br />";
			$error_msg .= $lang['Wrong_birthday_format'];
		} else
		if ($user_age>$board_config['max_user_age'])
		{
			$error = TRUE;
			if( isset($error_msg) )$error_msg .= "<br />";
			$error_msg .= sprintf($lang['Birthday_to_high'],$board_config['max_user_age']);
		} else
		if ($user_age<$board_config['min_user_age'])
		{
			$error = TRUE;
			if( isset($error_msg) )$error_msg .= "<br />";
			$error_msg .= sprintf($lang['Birthday_to_low'],$board_config['min_user_age']);
		} else
		{
			$birthday = ($error) ? $birthday : mkrealdate($b_day,$b_md,$b_year);
			$next_birthday_greeting = (date('md')<$b_md.(($b_day <= 9) ? '0':'').$b_day) ? date('Y'):date('Y')+1 ;
		}
	} else
	{
		if ($board_config['birthday_required'])
		{
			$error = TRUE;
			if( isset($error_msg) )$error_msg .= "<br />";
			$error_msg .= sprintf($lang['Birthday_require']);
		}
		$birthday = 999999;
	}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
			$sql = "UPDATE " . USERS_TABLE . "
				SET

#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
str_replace("\'", "''", $interests) . "'

# 
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_birthday = '$birthday', user_next_birthday_greeting = '$next_birthday_greeting'

#
#-----[ FIND ]------------------------------------------------
#
# NOTICE - IMPORTENT SECURITY RISK
#
# If you some how do not preform the following VERY carefully you have the
# potential to compromise your forum SECURITY, your users may easyly get ADMIN access if you make mistake
# meny users do make mistake in the step, so please be very exact, if this fail, then do not run your code on live forum
#
			$sql = "INSERT INTO " . USERS_TABLE . "

#
#-----[ IN-LINE FIND ]----------------------------------------
#
, user_active, user_actkey)

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, user_birthday, user_next_birthday_greeting

#
#-----[ FIND ]------------------------------------------------
#
	VALUES ($user_id,

#
#-----[ IN-LINE FIND ]----------------------------------------
#
, ";

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, '$birthday', '$next_birthday_greeting'

#
#-----[ FIND ]------------------------------------------------
#
	$interests = $userdata['user_interests'];

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	$birthday = $userdata['user_birthday'];
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
	display_avatar_gallery($mode

#
#-----[ IN-LINE FIND ]----------------------------------------
#
);

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------
#
, $birthday

#
#-----[ FIND ]------------------------------------------------
#
	if ( $error )
	{
		$template->set_filenames(array(

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
if ( $birthday!=999999 )
{
	$b_day = realdate('j', $birthday);
	$b_md = realdate('n', $birthday);
	$b_year = realdate('Y', $birthday);
	$birthday = realdate($lang['Submit_date_format'], $birthday);
} else
{
	$b_day = '';
	$b_md = '';
	$b_year = '';
	$birthday = '';
}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
//
// Let's do an overall check for settings/versions which would prevent

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
	$s_b_day = '<span class="genmed">' . $lang['Day'] . '&nbsp;</span><select name="b_day" size="1" class="gensmall"> 
		<option value="0">&nbsp;-&nbsp;</option> 
		<option value="1">&nbsp;1&nbsp;</option>
		<option value="2">&nbsp;2&nbsp;</option>
		<option value="3">&nbsp;3&nbsp;</option>
		<option value="4">&nbsp;4&nbsp;</option>
		<option value="5">&nbsp;5&nbsp;</option>
		<option value="6">&nbsp;6&nbsp;</option>
		<option value="7">&nbsp;7&nbsp;</option>
		<option value="8">&nbsp;8&nbsp;</option>
		<option value="9">&nbsp;9&nbsp;</option>
		<option value="10">&nbsp;10&nbsp;</option>
		<option value="11">&nbsp;11&nbsp;</option>
		<option value="12">&nbsp;12&nbsp;</option>
		<option value="13">&nbsp;13&nbsp;</option>
		<option value="14">&nbsp;14&nbsp;</option>
		<option value="15">&nbsp;15&nbsp;</option>
		<option value="16">&nbsp;16&nbsp;</option>
		<option value="17">&nbsp;17&nbsp;</option>
		<option value="18">&nbsp;18&nbsp;</option>
		<option value="19">&nbsp;19&nbsp;</option>
		<option value="20">&nbsp;20&nbsp;</option>
		<option value="21">&nbsp;21&nbsp;</option>
		<option value="22">&nbsp;22&nbsp;</option>
		<option value="23">&nbsp;23&nbsp;</option>
		<option value="24">&nbsp;24&nbsp;</option>
		<option value="25">&nbsp;25&nbsp;</option>
		<option value="26">&nbsp;26&nbsp;</option>
		<option value="27">&nbsp;27&nbsp;</option>
		<option value="28">&nbsp;28&nbsp;</option>
		<option value="29">&nbsp;29&nbsp;</option>
		<option value="30">&nbsp;30&nbsp;</option>
		<option value="31">&nbsp;31&nbsp;</option>
	  	</select>&nbsp;&nbsp;';
	$s_b_md = '<span class="genmed">' . $lang['Month'] . '&nbsp;</span><select name="b_md" size="1" class="gensmall"> 
     		<option value="0">&nbsp;-&nbsp;</option> 
		<option value="1">&nbsp;'.$lang['datetime']['January'].'&nbsp;</option>
		<option value="2">&nbsp;'.$lang['datetime']['February'].'&nbsp;</option>
		<option value="3">&nbsp;'.$lang['datetime']['March'].'&nbsp;</option>
		<option value="4">&nbsp;'.$lang['datetime']['April'].'&nbsp;</option>
		<option value="5">&nbsp;'.$lang['datetime']['May'].'&nbsp;</option>
		<option value="6">&nbsp;'.$lang['datetime']['June'].'&nbsp;</option>
		<option value="7">&nbsp;'.$lang['datetime']['July'].'&nbsp;</option>
		<option value="8">&nbsp;'.$lang['datetime']['August'].'&nbsp;</option>
		<option value="9">&nbsp;'.$lang['datetime']['September'].'&nbsp;</option>
		<option value="10">&nbsp;'.$lang['datetime']['October'].'&nbsp;</option>
		<option value="11">&nbsp;'.$lang['datetime']['November'].'&nbsp;</option>
		<option value="12">&nbsp;'.$lang['datetime']['December'].'&nbsp;</option>
		</select>&nbsp;&nbsp;';
	$s_b_day= str_replace("value=\"".$b_day."\">", "value=\"".$b_day."\" SELECTED>" ,$s_b_day);
	$s_b_md = str_replace("value=\"".$b_md."\">", "value=\"".$b_md."\" SELECTED>" ,$s_b_md);
	$s_b_year = '<span class="genmed">' . $lang['Year'] . '&nbsp;</span><input type="text" class="post" style="width: 50px" name="b_year" size="4" maxlength="4" value="' . $b_year . '" />&nbsp;&nbsp;'; 
	$i = 0;
	$s_birthday = '';
	for ($i=0; $i<=strlen($lang['Submit_date_format']); $i++)
	{
		switch ($lang['Submit_date_format'][$i])
		{
			case d:  $s_birthday .= $s_b_day;break;
			case m:  $s_birthday .= $s_b_md;break;
			case Y:  $s_birthday .= $s_b_year;break;
		}
	}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'OCCUPATION' =>
'INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		'S_BIRTHDAY' => $s_birthday,
		'BIRTHDAY_REQUIRED' => ($board_config['birthday_required']) ? '*' : '',
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'L_INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
		'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------------
#
//
// Generate page

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
if ($profiledata['user_birthday']!=999999)
{
 	include($phpbb_root_path . 'includes/chinese.'.$phpEx);
	$chinese = get_chinese_year( realdate('Ymd', $profiledata['user_birthday']) );
	$u_chinese = $images[$chinese];
	$chinese_img = ($chinese=='Unknown') ? '' : '<img src="' . $u_chinese . '" alt="' . $lang[$chinese] . '" title="' . $lang[$chinese] . '" align="top" border="0" />';
	$user_birthdate = realdate('md', $profiledata['user_birthday']);
	$i=0;
	while ($i<26)
	{
		if ($user_birthdate>=$zodiacdates[$n] && $user_birthdate<=$zodiacdates[$i+1])
		{
			$zodiac = $lang[$zodiacs[($i/2)]];
			$u_zodiac = $images[$zodiacs[($i/2)]];
			$zodiac_img = '<img src="' . $u_zodiac . '" alt="' . $zodiac . '" title="' . $zodiac . '" align="top" border="0" />';
			$i=26;
		} else
		{
			$i=$i+2;
		}
	}
	$user_birthday = realdate($lang['DATE_FORMAT'], $profiledata['user_birthday']);
} else
{
	$user_birthday = $lang['No_birthday_specify'];
}
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	'BIRTHDAY' => $user_birthday,
	'ZODIAC' => $zodiac,
	'ZODIAC_IMG' => $zodiac_img,
	'L_ZODIAC' => $lang['Zodiac'],
	'U_ZODIAC' => $u_zodiac,
	'CHINESE' => $lang[$chinese],
	'CHINESE_IMG' => $chinese_img,
	'U_CHINESE' => $u_chinese,
	'L_CHINESE' => $lang['Chinese_zodiac'],
// End add - Birthday MOD

#
#-----[ FIND ]------------------------------------------------
#
'L_INTERESTS' =>

#
#-----[ AFTER, ADD ]------------------------------------------
#

// Start add - Birthday MOD
	'L_BIRTHDAY' => $lang['Birthday'],
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
$lang['Birthday_required'] = 'Force users to submit a birthday';
$lang['Enable_birthday_greeting'] = 'Enable birthday greetings';
$lang['Birthday_greeting_expain'] = 'Users who have submitted a birthday can have a birthday greeting, when thy visit the board';
$lang['Next_birthday_greeting'] = 'Next birthday popup year';
$lang['Next_birthday_greeting_expain'] = 'This field keeps track of the next year the user shall have a birthday greeting';
$lang['Wrong_next_birthday_greeting'] = 'The supplied, next birthday popup year, was not valid, please try again';
$lang['Max_user_age'] = 'Maximum user age';
$lang['Min_user_age'] = 'Minimum user age';
$lang['Birthday_lookforward'] = 'Birthday look forward';
$lang['Birthday_lookforward_explain'] = 'Number of days the script shall look forward for users with a birthday';
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]-----------------------------------------
#

// Start add - Birthday MOD
$lang['Birthday'] = 'Birthday';
$lang['No_birthday_specify'] = 'None Specified';
$lang['Age'] = 'Age';
$lang['Wrong_birthday_format'] = 'The birthday format was entered incorrectly.'; 
$lang['Birthday_to_high'] = 'Sorry, this site, does not accept user older than %d years old';
$lang['Birthday_require'] = 'your Birthday are required on this site';
$lang['Birthday_to_low'] = 'Sorry, this site, does not accept user yonger than %d years old';
$lang['Submit_date_format'] = 'd-m-Y'; //php date() format - Note: ONLY d, m and Y may be used and SHALL ALL be used (different seperators are accepted)
$lang['Birthday_greeting_today'] = 'We would like to wish you congratulatons on reaching %s years old today.<br /><br /> The Management';//%s is substituted with the users age
$lang['Birthday_greeting_prev'] = 'We would like to give you a belated congratulatons for becoming %s years old on the %s.<br /><br /> The Management';//%s is substituted with the users age, and birthday
$lang['Greeting_Messaging'] = 'Congratulations';
$lang['Birthday_today'] = 'Users with a birthday today:';
$lang['Birthday_week'] = 'Users with a birthday within the next %d days:';
$lang['Nobirthday_week'] = 'No users are having a birthday in the upcoming %d days'; // %d is substitude with the number of days
$lang['Nobirthday_today'] = 'No users have a birthday today';
$lang['Year'] = 'Year';
$lang['Month'] = 'Month';
$lang['Day'] = 'Day';

// NOTE: Please do not translate the folowing 4 lines !
// They are automatically translated into your language
$lang['day_short'] = array ($lang['datetime']['Sun'],$lang['datetime']['Mon'],$lang['datetime']['Tue'],$lang['datetime']['Wed'],$lang['datetime']['Thu'],$lang['datetime']['Fri'],$lang['datetime']['Sat']);
$lang['day_long'] = array ($lang['datetime']['Sunday'],$lang['datetime']['Monday'],$lang['datetime']['Tuesday'],$lang['datetime']['Wednesday'],$lang['datetime']['Thursday'],$lang['datetime']['Friday'],$lang['datetime']['Saturday']);
$lang['month_short'] = array ($lang['datetime']['Jan'],$lang['datetime']['Feb'],$lang['datetime']['Mar'],$lang['datetime']['Apr'],$lang['datetime']['May'],$lang['datetime']['Jun'],$lang['datetime']['Jul'],$lang['datetime']['Aug'],$lang['datetime']['Sep'],$lang['datetime']['Oct'],$lang['datetime']['Nov'],$lang['datetime']['Dec']);
$lang['month_long'] = array ($lang['datetime']['January'],$lang['datetime']['February'],$lang['datetime']['March'],$lang['datetime']['April'],$lang['datetime']['May'],$lang['datetime']['June'],$lang['datetime']['July'],$lang['datetime']['August'],$lang['datetime']['September'],$lang['datetime']['October'],$lang['datetime']['November'],$lang['datetime']['December']);
// zodiacs used for birthday mod
$lang['Zodiac'] = 'Zodiac';
$lang['Capricorn'] = 'Capricorn';
$lang['Aquarius'] = 'Aquarius';
$lang['Pisces'] = 'Pisces';
$lang['Aries'] = 'Aries';
$lang['Taurus'] = 'Taurus';
$lang['Gemini'] = 'Gemini';
$lang['Cancer'] = 'Cancer';
$lang['Leo'] = 'Leo';
$lang['Virgo'] = 'Virgo';
$lang['Libra'] = 'Libra';
$lang['Scorpio'] = 'Scorpio';
$lang['Sagittarius'] = 'Sagittarius';
// chinese zodiacs used for birthday mod
$lang['Chinese_zodiac']= 'Chinese zodiac';
$lang['Unknown'] = 'Unknown';
$lang['Rat'] = 'Rat';
$lang['Buffalo'] = 'Buffalo';
$lang['Tiger'] = 'Tiger';
$lang['Cat'] = 'Cat';
$lang['Dragon'] = 'Dragon';
$lang['Snake'] = 'Snake';
$lang['Horse'] = 'Horse';
$lang['Goat'] = 'Goat';
$lang['Monkey'] = 'Monkey';
$lang['Cock'] = 'Cock';
$lang['Dog'] = 'Dog';
$lang['Pig'] = 'Pig';
// End add - Birthday MOD

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/index_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
whosonline.gif

# 
#-----[ IN-LINE FIND ]---------------------------------------- 
# 
rowspan="{%:1}"

# 
#-----[ IN-LINE INCREMENT ]----------------------------------- 
# 
%:1 +1

#
#-----[ FIND ]------------------------------------------------
#
{LOGGED_IN_USER_LIST}</span></td>
  </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- Start add - Birthday MOD -->
  <tr>
	<td class="row1" align="left"><span class="gensmall">{L_WHOSBIRTHDAY_TODAY}<br />{L_WHOSBIRTHDAY_WEEK}</span></td>
  </tr>
<!-- End add - Birthday MOD -->

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------------
#
<!-- END switch_enable_pm_popup -->

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- Start add - Birthday MOD -->
{GREETING_POPUP}
<!-- End add - Birthday MOD -->

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/profile_add_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
<!-- Visual Confirmation -->
<!-- BEGIN switch_confirm -->

#
#-----[ BEFORE, ADD ]------------------------------------------
#

<!-- Start add - Birthday MOD -->
	<tr>
	  <td class="row1"><span class="gen">{L_BIRTHDAY}:{BIRTHDAY_REQUIRED}</span></td>
	  <td class="row2"><span class="gen">{S_BIRTHDAY}</span></td>
	</tr>
<!-- End add - Birthday MOD -->


#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- Start add - Birthday MOD -->
		<tr>
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_BIRTHDAY}:</span></td>
		  <td><b><span class="gen">{BIRTHDAY}</span></b></td>
		</tr>
		<tr>
		  <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_ZODIAC}:&nbsp;</span></td>
		  <td><b><span class="gen">{ZODIAC}&nbsp;{ZODIAC_IMG}</b></span></td>
		</tr>
		<tr>
		  <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_CHINESE}:&nbsp;</span></td>
		  <td><b><span class="gen">{CHINESE}&nbsp;{CHINESE_IMG}</b></span></td>
		</tr>
<!-- End add - Birthday MOD -->

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/subSilver.cfg

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

//added for birthday mod
$images['Capricorn'] = "$current_template_images/icon_zodiac_capricorn.gif";
$images['Aquarius'] = "$current_template_images/icon_zodiac_aquarius.gif";
$images['Pisces'] = "$current_template_images/icon_zodiac_pisces.gif";
$images['Aries'] = "$current_template_images/icon_zodiac_aries.gif";
$images['Taurus'] = "$current_template_images/icon_zodiac_taurus.gif";
$images['Gemini'] = "$current_template_images/icon_zodiac_gemini.gif";
$images['Cancer'] = "$current_template_images/icon_zodiac_cancer.gif";
$images['Leo'] = "$current_template_images/icon_zodiac_leo.gif";
$images['Virgo'] = "$current_template_images/icon_zodiac_virgo.gif";
$images['Libra'] = "$current_template_images/icon_zodiac_libra.gif";
$images['Scorpio'] = "$current_template_images/icon_zodiac_scorpio.gif";
$images['Sagittarius'] = "$current_template_images/icon_zodiac_sagittarius.gif";
//added for birthday mod
$images['Rat'] = "$current_template_images/icon_chinese_rat.gif";
$images['Buffalo'] = "$current_template_images/icon_chinese_buffalo.gif";
$images['Tiger'] = "$current_template_images/icon_chinese_tiger.gif";
$images['Cat'] = "$current_template_images/icon_chinese_cat.gif";
$images['Dragon'] = "$current_template_images/icon_chinese_dragon.gif";
$images['Snake'] = "$current_template_images/icon_chinese_snake.gif";
$images['Horse'] = "$current_template_images/icon_chinese_horse.gif";
$images['Goat'] = "$current_template_images/icon_chinese_goat.gif";
$images['Monkey'] = "$current_template_images/icon_chinese_monkey.gif";
$images['Cock'] = "$current_template_images/icon_chinese_cock.gif";
$images['Dog'] = "$current_template_images/icon_chinese_dog.gif";
$images['Pig'] = "$current_template_images/icon_chinese_pig.gif";

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
{postrow.POSTER_AVATAR}<br /><br />

#
#-----[ IN-LINE FIND ]----------------------------------------
#
{postrow.POSTER_AVATAR}<br /><br />

#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
{postrow.POSTER_AGE}<br />{postrow.L_ZODIAC}{postrow.ZODIAC_IMG}<br />{postrow.L_CHINESE}{postrow.CHINESE_IMG}<br />

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/admin/board_config_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
{PRUNE_NO} /> {L_NO}</td>
	</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- Start add - Birthday MOD -->
	<tr>
		<td class="row1">{L_BIRTHDAY_REQUIRED}<br /></td>
		<td class="row2"><input type="radio" name="birthday_required" value="1" {BIRTHDAY_REQUIRED_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="birthday_required" value="0" {BIRTHDAY_REQUIRED_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_ENABLE_BIRTHDAY_GREETING}<br /><span class="gensmall">{L_BIRTHDAY_GREETING_EXPLAIN}</span></td>
		<td class="row2"><input type="radio" name="birthday_greeting" value="1" {BIRTHDAY_GREETING_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="birthday_greeting" value="0" {BIRTHDAY_GREETING_NO} /> {L_NO}</td>
	</tr>
	<tr>
		<td class="row1">{L_MAX_USER_AGE}<br /></td>
		<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="max_user_age" value="{MAX_USER_AGE}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_MIN_USER_AGE}<br /><span class="gensmall">{L_MIN_USER_AGE_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="4" maxlength="4" name="min_user_age" value="{MIN_USER_AGE}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_BIRTHDAY_LOOKFORWARD}<br /><span class="gensmall">{L_BIRTHDAY_LOOKFORWARD_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="3" maxlength="3" name="birthday_check_day" value="{BIRTHDAY_LOOKFORWARD}" /></td>
	</tr>
<!-- End add - Birthday MOD -->

#
#-----[ OPEN ]------------------------------------------------
#
# Make sure to edit this file for every theme you use!
#
templates/subSilver/admin/user_edit_body.tpl

#
#-----[ FIND ]------------------------------------------------
#
		<input class="post" type="text" name="interests" size="35" maxlength="150" value="{INTERESTS}" />
	  </td>
	</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- Start add - Birthday MOD -->
	<tr>
	  <td class="row1"><span class="gen">{L_BIRTHDAY}</span></td>
	  <td class="row2">{S_BIRTHDAY}</td>
	</tr>
	<tr>
	  <td class="row1"><span class="gen">{L_NEXT_BIRTHDAY_GREETING}:</span><br /><span class="gensmall">{L_NEXT_BIRTHDAY_GREETING_EXPLAIN}<br /></span></td>
	  <td class="row2"><input class="post" type="text" name="next_birthday_greeting" size="5" maxlength="4" value="{NEXT_BIRTHDAY_GREETING}" /></td>
	</tr>
<!-- End add - Birthday MOD -->

# 
#-----[ DIY INSTRUCTIONS ]------------------------------------
#
Regardless how you've installed this MOD (by EasyMOD or manually), if you want to install other languages than English please use the sub MODs in the /translations/ directory (as for the moment EasyMOD is not able to carry on automatically).

#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
